From: Matthias Clasen Date: Thu, 16 Dec 2021 01:33:03 +0000 (-0500) Subject: wayland: Add sequences for touchpad gestures X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~91^2^2~45^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=27fa51cfa6a4991bfd81e239a2bd7118ac122ed8;p=gtk4.git wayland: Add sequences for touchpad gestures It makes sense. --- diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 24633ea7d3..d82db04fb2 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -137,6 +137,7 @@ struct _GdkWaylandPointerData { guint cursor_timeout_id; guint cursor_image_index; guint cursor_image_delay; + guint touchpad_event_sequence; guint current_output_scale; GSList *pointer_surface_outputs; @@ -2667,8 +2668,11 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; + if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) + seat->pointer_info.touchpad_event_sequence++; + event = gdk_touchpad_event_new_swipe (seat->pointer_info.focus, - NULL, + GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence), seat->logical_pointer, _time, device_get_modifiers (seat->logical_pointer), @@ -2764,8 +2768,11 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; + if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) + seat->pointer_info.touchpad_event_sequence++; + event = gdk_touchpad_event_new_pinch (seat->pointer_info.focus, - NULL, + GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence), seat->logical_pointer, _time, device_get_modifiers (seat->logical_pointer),